Matthias Clasen [Sun, 14 Feb 2016 14:29:55 +0000 (09:29 -0500)]
gtk-demo: Fix the size saving for CSD
We need to use gtk_window_get_size to get the correct size that
we can pass to gtk_window_set_default_size regardless of CSD
or not.
Lapo Calamandrei [Sun, 14 Feb 2016 15:38:42 +0000 (16:38 +0100)]
Adwaita: correct spacing for mixed buttons
Benjamin Otte [Sun, 14 Feb 2016 15:10:07 +0000 (16:10 +0100)]
paned: Fix drawing
Clip children to their window's size. That way no overdraw happens for
these widgets. But don't clip the handle.
We might in the future consider not clipping un-shrinkable children.
https://bugzilla.gnome.org/show_bug.cgi?id=762021
Benjamin Otte [Sun, 14 Feb 2016 15:07:06 +0000 (16:07 +0100)]
paned: Use content allocation instead of widget allocation
We don't want to include padding and borders in our calculations
involving the handle.
Benjamin Otte [Sun, 14 Feb 2016 14:52:19 +0000 (15:52 +0100)]
paned: rtl-flip with the correct rectangle
Lapo Calamandrei [Sun, 14 Feb 2016 13:44:57 +0000 (14:44 +0100)]
Adwaita: don't set a border for drop targets
to avoid active drop targets to grow.
Lapo Calamandrei [Sun, 14 Feb 2016 13:33:30 +0000 (14:33 +0100)]
Adwaita: scss cosmetic changes
Lapo Calamandrei [Sun, 14 Feb 2016 13:21:01 +0000 (14:21 +0100)]
Adwaita: fix scale popup button size
Michael Catanzaro [Sun, 14 Feb 2016 04:14:55 +0000 (22:14 -0600)]
Fix a typo
Matthias Clasen [Sun, 14 Feb 2016 03:53:16 +0000 (22:53 -0500)]
gtk-demo: Add window size saving example
Implement the recommendations from
https://wiki.gnome.org/HowDoI/SaveWindowState
in the Application Class example.
Matthias Clasen [Sun, 14 Feb 2016 02:46:40 +0000 (21:46 -0500)]
gtk-demo: modernize the application demo
Subclass GtkApplication and GtkApplicationWindow
and use a template.
Lapo Calamandrei [Sun, 14 Feb 2016 01:35:28 +0000 (02:35 +0100)]
Adwaita: try being smarter wrt extending buttons.
Lapo Calamandrei [Sun, 14 Feb 2016 00:20:02 +0000 (01:20 +0100)]
Revert "Adwaita: remove an unneded selector."
This reverts commit
05dff4ccb014e32b572505fb098006aa80a72387.
It was needed actually...
Lapo Calamandrei [Sat, 13 Feb 2016 23:34:29 +0000 (00:34 +0100)]
Adwaita: remove an unneded selector.
Lapo Calamandrei [Sat, 13 Feb 2016 23:25:04 +0000 (00:25 +0100)]
Adwaita: notebook arrow styling.
Matthias Clasen [Sat, 13 Feb 2016 22:11:59 +0000 (17:11 -0500)]
widget-factory: Add an inline toolbar example
This pattern is still used in applications, so we should have it
represented here to keep it working well.
Matthias Clasen [Sat, 13 Feb 2016 04:40:26 +0000 (23:40 -0500)]
Docuemnt calc() support in CSS
Chao-Hsiung Liao [Sat, 13 Feb 2016 06:19:31 +0000 (06:19 +0000)]
Updated Chinese (Taiwan) translation
Chao-Hsiung Liao [Sat, 13 Feb 2016 06:17:15 +0000 (06:17 +0000)]
Updated Chinese (Taiwan) translation
Benjamin Otte [Sat, 13 Feb 2016 05:41:29 +0000 (06:41 +0100)]
testsuite: Don't use deprecated APIs
Benjamin Otte [Sat, 13 Feb 2016 05:26:42 +0000 (06:26 +0100)]
tests: Port testlockbutton to GTask
Get rid of deprecations that way.
Benjamin Otte [Sat, 13 Feb 2016 03:47:51 +0000 (04:47 +0100)]
css: Implement transitions for numbers of different units
We now can transition from 10px to 100%.
Note that this requires a teensy tiny hack in
gtk_css_value_transition(), but so be it.
Benjamin Otte [Sat, 13 Feb 2016 03:12:45 +0000 (04:12 +0100)]
calc: Allow subterms with '(' ')' bracketing
Some more tests included.
Benjamin Otte [Sat, 13 Feb 2016 02:56:12 +0000 (03:56 +0100)]
css: Add support for '*' and '/' to calc()
More tests are included.
Benjamin Otte [Sat, 13 Feb 2016 01:31:47 +0000 (02:31 +0100)]
css: Add API to handle order when printing calc()
Also, add some tests and update old ones to print calc() statements
correctly.
Benjamin Otte [Fri, 12 Feb 2016 06:59:06 +0000 (07:59 +0100)]
css: Add support for sums to calc()
This requires adding code to do math on number values:
gtk_css_number_value_multiply()
and
gtk_css_number_value_try_add()
were added to achieve that.
Some tests are included.
Benjamin Otte [Fri, 12 Feb 2016 05:56:14 +0000 (06:56 +0100)]
css: Add initial support for calc()
So far, calc() only supports literals, ie it's completely useless.
Benjamin Otte [Fri, 12 Feb 2016 05:45:06 +0000 (06:45 +0100)]
css: Add gtk_css_number_value_can_parse()
Use it instead of _gtk_css_parser_has_number().
We need that once we introduce calc() support.
Benjamin Otte [Fri, 12 Feb 2016 05:25:50 +0000 (06:25 +0100)]
css: Turn number values into a virtual type
GtkCssNumberValue is now a base class for numbers.
Actual numbers are now implemented in GtkCssDimensionValue. The name is
borrowed from the CSS spec, so there.
Benjamin Otte [Fri, 12 Feb 2016 03:40:35 +0000 (04:40 +0100)]
cssnumbervalue: Remove gtk_css_number_value_get_unit()
This is in preparation for calc(), as calc(50% - 5px) is valid CSS
but has 2 units. Instead, add a function to query a value's dimension
(so we can differentiate lengths from numbers) and add a function to
query if the value contains percentages.
Benjamin Otte [Fri, 12 Feb 2016 03:09:44 +0000 (04:09 +0100)]
linear-gradient: Remove the hack using NUMBER
Instead, add a "side" member to the struct that keeps sides explicitly.
Benjamin Otte [Fri, 12 Feb 2016 20:22:23 +0000 (21:22 +0100)]
cssimageradial: Don't print 2 spaces
Matthias Clasen [Sat, 13 Feb 2016 03:26:04 +0000 (22:26 -0500)]
gadget: Be careful in geometry calculations
Margins can be negative, and if we are not careful, then
content+padding+margin can end up with negative dimensions,
which can upset pixman and others. This commit ensures
that a gadget will not request or draw boxes with negative
dimensions, and get_border_allocation and get_content_allocation
will not return boxes with negative dimensions.
This fixes a crash in the paned separator drawing code that
can be reproduced by setting separator padding to 0.
https://bugzilla.gnome.org/show_bug.cgi?id=759657
Matthias Clasen [Sat, 13 Feb 2016 03:05:40 +0000 (22:05 -0500)]
file chooser: Avoid nonworking search+save combinations
With the location entry up in the header bar in save mode, we can
end up with the search model being in use when the user types in
the location entry. In this case, we don't make the Save button
sensitive as we should.
Having two entries in the dialog is somewhat confusing anyway,
so just stop the search when the user starts typing in the location
entry.
https://bugzilla.gnome.org/show_bug.cgi?id=761757
Matthias Clasen [Sat, 13 Feb 2016 01:35:26 +0000 (20:35 -0500)]
file chooser: Use the right model when getting the selection
We don't need to make assumptions about which model is currently
used since gtk_tree_selection_get_selection hands us the model.
https://bugzilla.gnome.org/show_bug.cgi?id=761757
Matthias Clasen [Fri, 12 Feb 2016 23:24:20 +0000 (18:24 -0500)]
Adwaita: Insensitive notebook arrows
Just make insensitive notebook arrows gray until better
styling appears.
https://bugzilla.gnome.org/show_bug.cgi?id=761716
Matthias Clasen [Fri, 12 Feb 2016 23:09:41 +0000 (18:09 -0500)]
paned: Draw handle before children
Carlos Garnacho [Fri, 12 Feb 2016 20:59:29 +0000 (21:59 +0100)]
x11: Avoid setting has_pointer_focus if a EWMH compliant WM is present
This is mostly useful to have focus behave sanely on lack of WM, so avoid
any check there if we're positive there is a WM handling focus.
https://bugzilla.gnome.org/show_bug.cgi?id=677329
Matthias Clasen [Fri, 12 Feb 2016 20:01:58 +0000 (15:01 -0500)]
paned: Don't overdraw
When moving children 'off', we can't allow them to draw outside
the paned allocation, so clip when drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=761903
Caolán McNamara [Thu, 11 Feb 2016 17:22:31 +0000 (17:22 +0000)]
gtk-demo: spinbutton and menubar examples
https://bugzilla.gnome.org/show_bug.cgi?id=761900
Jakub Steiner [Fri, 12 Feb 2016 13:38:03 +0000 (14:38 +0100)]
Adwaita: make popovers less 1995
- use regular bgcolor
Carlos Garcia Campos [Fri, 12 Feb 2016 12:21:14 +0000 (13:21 +0100)]
Revert "Remove _gtk_box_get_children"
This reverts commit
572e9a04027e213082a5b257e5d662a5daa32667.
_gtk_box_get_children was not doing exactly the same than
gtk_container_get_children does, because the latter uses the forall
implementation of GtkBox that takes into account the children pack mode while
the former just iterated the list of children. This broke the order of
the buttons in a GtkButtonBox when they were packaged with PACK_END.
Matthias Clasen [Fri, 12 Feb 2016 03:51:35 +0000 (22:51 -0500)]
placessidebar: Increase padding
This should bring us back to the look of 3.18.
https://bugzilla.gnome.org/show_bug.cgi?id=761791
Colomban Wendling [Wed, 10 Feb 2016 18:43:34 +0000 (19:43 +0100)]
treeview: Make sure the editing widget's top left is always visible
https://bugzilla.gnome.org/show_bug.cgi?id=761838
Matthias Clasen [Fri, 12 Feb 2016 03:35:11 +0000 (22:35 -0500)]
Adwaita: Don't grow flat entries
Entries in treeviews and similar embedded situations don't really
work well if their height is forced to be big. Take out the min-height
for these.
https://bugzilla.gnome.org/show_bug.cgi?id=761686
Caolán McNamara [Tue, 26 Jan 2016 12:08:01 +0000 (12:08 +0000)]
cannot not -> must
https://bugzilla.gnome.org/show_bug.cgi?id=761826
Matthias Clasen [Fri, 12 Feb 2016 03:15:43 +0000 (22:15 -0500)]
placesview: Fix some minor issues
Make the button not grow too big, and ensure that the actionbar
has a background.
https://bugzilla.gnome.org/show_bug.cgi?id=761792
Matthias Clasen [Fri, 12 Feb 2016 03:03:47 +0000 (22:03 -0500)]
Adwaita: tone down treeview separators
John Ralls [Thu, 11 Feb 2016 21:49:07 +0000 (13:49 -0800)]
Fix Quartz clipboard image retrieval.
It does no good to iterate through a series of mime types to call a
function when the eventually-called function,
_gtk_quartz_get_selection_data_from_pasteboard() in this case, gives the
wrong answer and stops the iteration on all but one especially if that
one isn't first.
The one is "image/tiff" and the quartz pasteboard function will return
any image type Quartz knows about for it, so lose the iteration and use
only "image/tiff".
Lapo Calamandrei [Thu, 11 Feb 2016 17:38:31 +0000 (18:38 +0100)]
Adwaita: fix bogus selector...
...ruining the indeterminate check animation
Lapo Calamandrei [Thu, 11 Feb 2016 17:27:25 +0000 (18:27 +0100)]
Adwaita: animate check and radios
Emmanuele Bassi [Thu, 11 Feb 2016 11:59:12 +0000 (11:59 +0000)]
mir: Add C++ guards
Avoid missing symbols when compiling C++ including the GDK Mir backend
header.
https://bugzilla.gnome.org/show_bug.cgi?id=761829
Matthias Clasen [Thu, 11 Feb 2016 11:47:28 +0000 (06:47 -0500)]
notebook: fix arrow states
Some code was confusing 0 with ARROW_NONE, causing us to not properly
update the state of the arrow gadgets.
Benjamin Otte [Thu, 11 Feb 2016 03:14:56 +0000 (04:14 +0100)]
inspector: Don't use unused variables
Windows-specific refactorings broke this.
Benjamin Otte [Thu, 11 Feb 2016 03:14:28 +0000 (04:14 +0100)]
win32: Move init code into windows-specific code
Avoids warnings about undefined functions on non-windows.
Benjamin Otte [Mon, 8 Feb 2016 03:07:40 +0000 (04:07 +0100)]
win32 theme: Add a GtkWin32Theme object
This object wraps a HTHEME and takes care of recreating it on theme changes.
Benjamin Otte [Mon, 8 Feb 2016 01:49:34 +0000 (02:49 +0100)]
win32: Capture WM_THEMECHANGED
We're not doing anything useful with it yet. This will follow in the coming commits.
Benjamin Otte [Mon, 8 Feb 2016 01:26:26 +0000 (02:26 +0100)]
win32: Remove XP-specific code
We don't support XP anymore.
Benjamin Otte [Mon, 8 Feb 2016 01:26:07 +0000 (02:26 +0100)]
win32: Remove unused functions / header includes
Benjamin Otte [Sun, 7 Feb 2016 22:48:46 +0000 (23:48 +0100)]
win32: Always pass a window to the default event filters
This has to happen or the event filter cannot identify what type
of display the event is from (ie if it's an XEvent, a broadway
event or a win32 MSG.
Benjamin Otte [Sun, 7 Feb 2016 19:14:02 +0000 (20:14 +0100)]
testsuite: No warnings on type conversions please
long is 32bit on win64, so it's int cast to pointer of different size, and gcc doesn't like that.
Benjamin Otte [Sun, 7 Feb 2016 18:20:09 +0000 (19:20 +0100)]
filechoosernativewin32: Remove unused variables
Benjamin Otte [Sun, 7 Feb 2016 18:19:36 +0000 (19:19 +0100)]
imcontextsimple: Remove unused variable on win32
Benjamin Otte [Sun, 7 Feb 2016 18:18:18 +0000 (19:18 +0100)]
testgtk: Compile without warnings on win32
Benjamin Otte [Sun, 7 Feb 2016 18:18:00 +0000 (19:18 +0100)]
tests: Remove unused variable
Benjamin Otte [Sun, 7 Feb 2016 03:11:55 +0000 (04:11 +0100)]
win32 theme: Get rid of deprecated style properties
That's pretty easy, because we can just delete them. The theme is broken either way.
Benjamin Otte [Sun, 7 Feb 2016 03:00:46 +0000 (04:00 +0100)]
win32 theme: Replace pseudoclasses with undeprecated ones
Benjamin Otte [Sun, 7 Feb 2016 02:54:17 +0000 (03:54 +0100)]
win32 theme: Do a quick'n'dirty search/replace
Try to replace the old style names with then new style names.
The theme is still entirely way too broken. But at least one can see something.
Benjamin Otte [Sat, 6 Feb 2016 05:35:41 +0000 (06:35 +0100)]
win32: Remove _gdk_display usge from dnd code
Benjamin Otte [Sat, 6 Feb 2016 04:53:51 +0000 (05:53 +0100)]
win32: Make cursor code work without _gdk_display
Benjamin Otte [Sat, 6 Feb 2016 04:46:09 +0000 (05:46 +0100)]
win32: Stop using _gdk_display global in device code
Use gdk_device_get_display() instead.
Benjamin Otte [Sat, 6 Feb 2016 04:23:32 +0000 (05:23 +0100)]
win32embedwidget: Mark deprecated sections
Benjamin Otte [Sat, 6 Feb 2016 03:33:50 +0000 (04:33 +0100)]
filechoosernativewin32: Silence gcc
Benjamin Otte [Sat, 6 Feb 2016 03:33:14 +0000 (04:33 +0100)]
filechoosernativewin32: Add missing return type
Looks like a line accidentally was deleted there.
Benjamin Otte [Sat, 6 Feb 2016 03:24:39 +0000 (04:24 +0100)]
filechoosernativewin32: Define MSC_VER at top of file
The headers we include might include windows headers which define _MSC_VER already.
Benjamin Otte [Sat, 6 Feb 2016 03:24:23 +0000 (04:24 +0100)]
printoperation-win32: Silence gcc
Benjamin Otte [Sat, 6 Feb 2016 02:58:39 +0000 (03:58 +0100)]
mountoperation: Silence gcc
Also, printf()ing a GPid should be forbidden.
Benjamin Otte [Sat, 6 Feb 2016 02:38:37 +0000 (03:38 +0100)]
immodule: Stop gcc from complaining
Benjamin Otte [Sat, 6 Feb 2016 01:18:54 +0000 (02:18 +0100)]
win32: Remove deprecation warnings in dnd code
Benjamin Otte [Sat, 6 Feb 2016 01:18:28 +0000 (02:18 +0100)]
win32: Remove deprecation warnings in devicemanager code
Benjamin Otte [Sat, 6 Feb 2016 01:17:43 +0000 (02:17 +0100)]
win32: Use g_set_object()
... instead of a hand-rolled version that does the same thing.
Benjamin Otte [Sat, 6 Feb 2016 01:14:37 +0000 (02:14 +0100)]
win32: Fix empty body warning
Matthias Clasen [Thu, 11 Feb 2016 02:20:34 +0000 (21:20 -0500)]
gtk-demo: Add more foreign drawing examples
Add a notebook with an active tab.
Based on a patch by Caolan McNamara.
Caolán McNamara [Wed, 10 Feb 2016 21:01:54 +0000 (21:01 +0000)]
gtk-demo: attempt at a notebook with active box-shadow in tab
Matthias Clasen [Wed, 10 Feb 2016 21:10:23 +0000 (16:10 -0500)]
testgtk: Remove an unused variable
Caolán McNamara [Wed, 10 Feb 2016 13:39:24 +0000 (13:39 +0000)]
gtk-demo: Add a menu to foreigndrawing
and demo that the block arrows require GTK_STATE_FLAG_DIR_LTR or
GTK_STATE_FLAG_DIR_RTL set to appear
https://bugzilla.gnome.org/show_bug.cgi?id=761828
Rafael Fontenelle [Wed, 10 Feb 2016 16:55:55 +0000 (16:55 +0000)]
Updated Brazilian Portuguese translation
Timm Bäder [Wed, 10 Feb 2016 13:03:56 +0000 (14:03 +0100)]
overlay: set css name
Timm Bäder [Wed, 10 Feb 2016 13:03:39 +0000 (14:03 +0100)]
frame: Set border gadget state after creating it
Timm Bäder [Wed, 10 Feb 2016 11:30:35 +0000 (12:30 +0100)]
spinbutton: Free the gadget in finalize
Timm Bäder [Wed, 10 Feb 2016 11:28:32 +0000 (12:28 +0100)]
css node tree: Fix crash
This function would return "" whenever the state of the css node was
unset, causing a crash when selecting the css node tree from the
sidebar.
Matthias Clasen [Wed, 10 Feb 2016 05:07:37 +0000 (00:07 -0500)]
gtk-demo: Improve the tag implementation
Add margins and make it so that clicking on margins next to
links does not activate them.
Matthias Clasen [Wed, 10 Feb 2016 05:01:54 +0000 (00:01 -0500)]
text view: Improve tag pointer tracking
A problem that has been observed in polari is that links in tags
are clickable all the way into the margin. This problem is caused
by gtk_text_view_get_iter_at_position ignoring the return value
of pango_layout_xy_to_index. Instead, pass it back as a boolean
return value. This is technically an API break, but we've allowed
ourselves to change return types from void to gboolean before.
Rui Matos [Tue, 9 Feb 2016 14:30:00 +0000 (15:30 +0100)]
gtkmagnifier: Avoid a crash if the inspected widget is finalized
If the inspected widget is finalized and we then try to disconnect
from its signals we'll crash.
https://bugzilla.gnome.org/show_bug.cgi?id=761775
Timm Bäder [Tue, 9 Feb 2016 07:05:16 +0000 (08:05 +0100)]
A few more documentation fixes
Timm Bäder [Mon, 8 Feb 2016 21:49:01 +0000 (22:49 +0100)]
Various documentation fixes
Always have Since: annotations at the very bottom, use the correct
ClassName::signal-name/ClassName:property-name syntax, fix a few typos
in type names, wrong function names, non-existing type names, etc.
Rico Tzschichholz [Mon, 8 Feb 2016 13:02:25 +0000 (14:02 +0100)]
gtk: Fix some return-values annotations (transfer none/full)
Ignacio Casal Quinteiro [Mon, 8 Feb 2016 12:20:02 +0000 (13:20 +0100)]
win32: properly handle show and focus
The first time a window is shown we should always call SW_SHOWNORMAL.
Understand whether to call SW_SHOW or SW_SHOWNORMAL and the specific
ones for the temporary windows depending on IsWindowVisible.
This also fixes the problem when calling gtk_window_present and
the window is snapped to the left or right of the screen.
This patch is based on the patches provided by Yevgen Muntyan
and Aleksander Morgado.
https://bugzilla.gnome.org/show_bug.cgi?id=698652
Yevgen Muntyan [Mon, 8 Feb 2016 08:24:12 +0000 (09:24 +0100)]
win32: on focus restore the window if iconified
If the window is iconified we want to restore the window
to get the proper size instead of showing it normal which
would change the size of the window.
https://bugzilla.gnome.org/show_bug.cgi?id=698652
Baurzhan Muftakhidinov [Mon, 8 Feb 2016 08:54:59 +0000 (08:54 +0000)]
Updated Kazakh translation